package com.my.cloud.controller;

import com.my.cloud.entities.Order;
import com.my.cloud.resp.ResultData;
import com.my.cloud.service.OrderService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhupanlin
 * @version 1.0
 * @description: TODO
 * @date 2024/3/14 10:42
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Resource
    private OrderService orderService;
    
    /**
     * 创建订单
     */
    @GetMapping("/create")
    public ResultData create(Order order)
    {
        orderService.create(order);
        return ResultData.success(order);
    }
    
}
